package com.inifitness.tenant.core.system.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.inifitness.tenant.core.system.model.bo.BizRolePermsBO;
import com.inifitness.tenant.core.system.model.entity.BizRoleMenu;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 角色菜单访问层
 *
 * @author sunjinfeng
 * @since 2024/04/18 11:00:00
 */
@Mapper
public interface BizRoleMenuMapper extends BaseMapper<BizRoleMenu> {

  /**
   * 获取角色拥有的菜单ID集合
   *
   * @param roleId 角色ID
   * @return 菜单ID集合
   */
  List<Long> listMenuIdsByRoleId(@Param("roleId") Long roleId);

  /**
   * 获取权限和拥有权限的角色列表
   */
  List<BizRolePermsBO> getRolePermsList(@Param("roleCode") String roleCode);
}
